package com.tebiecloud.goods.client.service;

import com.tebiecloud.common.model.ResultBody;
import com.tebiecloud.goods.client.model.entity.Goods;
import com.tebiecloud.goods.client.model.entity.GoodsSpecification;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 商品公共接口
 */
public interface IGoodsApiServiceClient {

    /**
     * 根据商品id获取门店列表
     * @param goodsIds 商品id，多个用逗号隔开
     * @return
     */
    @GetMapping("/feign/api/listgoods")
    ResultBody<List<Goods>> selectByGoodsIds(@RequestParam("goodsIds") String goodsIds);

    /**
     * 查询一个商品的所有规格
     * @param goodsId
     * @return
     */
    @PostMapping("/feign/api/listgoodsspecification")
    ResultBody<List<GoodsSpecification>> selectGoodsSpecification(@RequestParam("goodsId") Long goodsId);

    /**
     *获取规格列表
     * @param specIds 规格id，多个用逗号隔开
     * @return
     */
    @GetMapping("/feign/api/listspecification")
    ResultBody<List<GoodsSpecification>> selectBySpecIds(@RequestParam("specIds") String specIds);

}
